Description: 这是linux下关于C的编程,其中包含了socket的几种用法的例子,有udp、tcp以及select的使用。-under linux on the C programming, which includes a socket several examples of usage, udp, tcp and select use. Platform: |
Size: 571308 |
Author:钟文德 |
Hits:
Description: 该程序演示了使用SOCKET select API模型,对用SOCKET进行网络服务器编程来说可以是一个很好指导-demonstration of the procedure used SOCKET select API model used for network server socket programming because it is a good guide Platform: |
Size: 11426 |
Author:李明 |
Hits:
Description: Winsocket DLL 封装,该类是SOCKET通讯综合模型,该类完成后将包装各种SOCKET通讯模式(阻塞select,异步窗口,异步事件,重叠I/O,完成I/O)等.它可以被各种通讯程序方便采用.尤其是基于SERVER/CLIENT的SERVER程序会提高大幅度性能.如果使用人要完成特定的通讯功能可以从该类继承,增加对线程池的支持功能。-Winsocket DLL package, such communication is SOCKET integrated model, such completion, will repackage the mode of communication SOCKET (blocking select, asynchronous window, asynchronous events, overlapping I/O, complete I/O). It can be convenient communications procedures used. In particular, based on SERVER/CLIENT SERVER the procedures significantly improve performance. If people use to accomplish specific communication from such succession, increasing the pool of threads support. Platform: |
Size: 21504 |
Author:江苏 |
Hits:
Description: UDP收包程序例子,基于非阻塞模式socket,并利用select()实现接收超时。-UDP packet admission procedure examples, based on the non-blocking mode of socket, and use select () to receive overtime realize. Platform: |
Size: 7168 |
Author:liu |
Hits:
Description: 传文件使用消息头方式3k每秒一客户一线程,并行传输,select i/o socket模型,测试无错.无丢包粘包.除非网络断开或掉网.
配套2个客户端接收,一个控制台.一个mfc-Way of transfer files using the header of a client of a thread-3k per second, parallel transmission, select i/o socket model, testing error-free. No packet loss stick package. Unless the network is disconnected or out of network. Supporting two clients received a console. a mfc Platform: |
Size: 156672 |
Author:styleman |
Hits:
Description: linux网络编程实例,讲解了一些udp tcp的socket编程,有select的例子-linux network programming examples to explain some of the udp tcp socket programming, there are select examples of Platform: |
Size: 571392 |
Author:yzh |
Hits:
Description: 通过UDP和select函数来实现非阻塞的通话机制,已达到客户端之间的通讯-Through the UDP and select functions to achieve non-blocking call mechanism, has reached the communication between the client Platform: |
Size: 16384 |
Author:方言 |
Hits:
Description: 这是一个关于各种IO模型的socket server实现与测试。
这里采用多种模型实现了一个TCP ECHO服务器,将client发送的内容echo回去。
client每秒会发送一次请求,server保持并发连接并进行相应。
现已实现的模型:
base: 最原始的echo服务器
thread: 多线程模型
select: select模型
poll: poll模型
epoll: epoll模型
参数
修改src/clients.sh 可以生成指定数量的client
修改src/base.cpp 中的MAX_CLIENT_NUM参数调整server最大服务数
修改src/base.cpp 中的CLIENT_INTERVAL参数调整client发包间隔
修改Makefile 中的DEBUG参数确定是否输出调试信息
使用方法(This is a socket server implementation and testing of various IO models.
Here, a variety of models are used to implement a TCP ECHO server that returns the contents sent by echo back to client.
Client sends a request per second, and server maintains concurrent connections and performs them accordingly.
The model has been implemented:
Base: the most primitive echo server
Thread: multithreaded model
Select: select model
Poll: poll model
Epoll: epoll model
parameter
Modify src/clients.sh to generate a specified number of client
Modify the MAX_CLIENT_NUM parameter in src/base.cpp to adjust the maximum number of server services
Modify the CLIENT_INTERVAL parameter in src/base.cpp to adjust the client contract interval
Modify the DEBUG parameter in the Makefile to determine whether output debugging information is out
Usage method) Platform: |
Size: 11264 |
Author:JIE2012
|
Hits: